import { defineStore } from "pinia";
export const useSetStore = defineStore("setting", {
  state() {
    return {
      device: "desktop",
      collapse: false,
      loading: true,
    };
  },
  getters: {
    getDevice: (state) => state.device,
    getCollapse: (state) => state.collapse,
    getLoading:(state)=>state.loading
  },
  actions: {
    toggleDevice(device) {
      this.device = device;
    },
    changeCollapse() {
      this.collapse = !this.collapse;
    },
    setLoading() {
      this.loading = !this.loading;
    },
  },
});
